package com.example.workone;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    private Button mBtnUc1;  //声明button
    private Button mBtnUc2;
    private Button mBtnUc3;
    private Button mBtnUc4;
    private Button mBtnUc5;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mBtnUc1 = findViewById(R.id.bn1);
        mBtnUc2 = findViewById(R.id.bn2);
        mBtnUc3 = findViewById(R.id.bn3);
        mBtnUc4 = findViewById(R.id.bn4);
        mBtnUc5 = findViewById(R.id.bn5);


        mBtnUc1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1
                Intent intent = new Intent(MainActivity.this, UC1.class);
                startActivity(intent);
            }
        });

        mBtnUc2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1
                Intent intent = new Intent(MainActivity.this, UC2.class);
                startActivity(intent);
            }
        });

        mBtnUc3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1
                Intent intent = new Intent(MainActivity.this, UC3.class);
                startActivity(intent);
            }
        });

        mBtnUc4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1
                Intent intent = new Intent(MainActivity.this, UC4.class);
                startActivity(intent);
            }
        });

        mBtnUc5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1
                Intent intent = new Intent(MainActivity.this, UC5.class);
                startActivity(intent);
            }
        });

    }
    }

